$(function() {

	$('#localStorage_teacher_name').val(localStorage.teacher_name);
	$('#localStorage_teacher_phone').val(localStorage.teacher_phone);
	$('#yue_messages_type').val(localStorage.yue_messages_type);

	$('.submit_final').click(function() {
		var address = $('#address').val();
		var order_time = $('#order_time').val();
		var yue_messages = $('#yue_messages').val();
		if($("#yue_messages").val() == ""){
			layer.msg("留言不能为空");
			return false;
		}else{
			localStorage.yue_messages = $("#yue_messages").val();
		}

		if(address == '') {
			layer.msg('请输入地址');
			return;
		}
		if(order_time == '') {
			layer.msg('请选择接送时间');
			return;
		}
		localStorage.address = address;
		localStorage.order_time = order_time;
		window.location.href = "../payment/teacher_pay.html"
	});
})

/*点击返回回退事件*/
function goback() {
	history.back();
}
